<div id="meetingTable">
  <table summary="" cellpadding="0" cellspacing="0" width="380px">
  <thead class="fixedHeader">
          <tr bgcolor="#224995">
            <th colspan="3"><h3>Meetings&nbsp;&nbsp;&nbsp;(<?php echo $meeting_total?>)</h3></th>
          </tr>
          <tr bgcolor="#224995">
            <td style="padding-left:3px; width:70px;">Day/Time</td>
            <td width="185px">Group</td>
            <td width="100px">Type</td>
          </tr>
       </thead>
          <tbody class="scrollContent">
            <?php		
$i = 0;
$dayheader = 0;

//outer loop begin
while ($row = mysql_fetch_assoc($meeting_result))
{
		$dayName = getDay($row['day']);
		// Set Time variables for reading
		$meeting_time=$row['mtime'];
		$rawtime = strtotime($meeting_time);	
		$meeting_time = date('g:iA',$rawtime);
		//$city=$row['city'];
		$groupname=$row['groupname'];
		//$room=$row['room'];
		$group_id=$row['group_id'];			
		//$location_name=$row['name'];
		$meeting_types_code=$row['code'];
			
		// set row color		
		if ($i%2 == 0) 
		{
		$rowcolor="$reprowcolor";
		} else 
		{
		$rowcolor="white";
		}
		// set heading in new day
		if ($dayheader != $row['day'])
		{echo "<tr><td style=\"padding-left:3px; width:60px; color:#fff; background:#000; \" colspan=\"4\">$dayName</td></tr>";
		$dayheader = $row['day'];}
		
		?>
            <tr onClick="DoNav('meetingsform.php?id=<?php echo $row[id]?>');" onMouseOver="this.bgColor='#c2e7fb';this.cursor='pointer'" onMouseOut="this.bgColor='<?php echo $rowcolor?>';" bgcolor="<?php echo $rowcolor?>">
              <td style="padding-left:3px; width:65px;"><?php echo "$meeting_time";?></td>
              <?php /*?><td align="right" valign="top"><div align="left"><?php echo "$city";?></div></td><?php */?>
              <td style="width:180px;"><?php echo "$groupname";?></td>
              <?php /*?><td valign="top"><?php echo "$location_name";?>
            <?php if ($room)echo " - $room" ?>
          </td><?php 
          <td align="right" valign="top"><div align="left"> <?php echo "$row[open_closed]";?></div></td> */?>
              <td style="width:100px;"><?php echo "$meeting_types_code";?></td>
              <?php /* <td valign="top"><?php echo "$row[men_women]";?></td>
          <td align="right" valign="top"><?php echo "$row[hc]";?></td>
          <td id="delete" align="right" valign="top"><a title="Delete" href="deleteform.php?id=<?php echo $row['id']?>&table=meetings">Delete</a></td> */?>
            </tr>
            <?php 
										
	$i++;	
// Outer loop end (group)						
}
?>
	</tbody>
  </table>
</div>
